﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace igflow.Components
{
    class testComponent : Components.igComponent
    {
        public testComponent()
        {

        }

        public override void Draw()
        {

            base.Draw();
        }

        public override void Update()
        {
            //gameObject.Rotation *= Quaternion.CreateFromYawPitchRoll(0.016f, 0, 0);
            //gameObject.Position += new Vector3(0.016f, 0, 0);
            base.Update();
        }
        public override void OnGUI()
        {
            // Temp strings
            string tl = "Top Left";
            string tr = "Top Right";
            string bl = "Bottom Left";
            string br = "Bottom Right";
            string ct = "Center Top";
            string cb = "Center Bottom";

            // Measure the strings ( used for positioning )
            Vector2 tlw = Fonts.normal.MeasureString(tl);
            Vector2 trw = Fonts.normal.MeasureString(tr);
            Vector2 brw = Fonts.normal.MeasureString(br);
            Vector2 blw = Fonts.normal.MeasureString(bl);
            Vector2 ctw = Fonts.normal.MeasureString(ct);
            Vector2 cbw = Fonts.normal.MeasureString(cb);



            // Draw our text
            GUI.Draw(tl, new Vector2(0, 0), Color.White);
            GUI.Draw(tr, new Vector2(Game1.screenWidth - trw.X, 0), Color.White);
            GUI.Draw(bl, new Vector2(0, Game1.screenHeight - blw.Y), Color.White);
            GUI.Draw(br, new Vector2(Game1.screenWidth - brw.X, Game1.screenHeight - brw.Y), Color.White);
            GUI.Draw(ct, new Vector2((Game1.screenWidth / 2) - (ctw.X / 2), 0), Color.White);
            GUI.Draw(cb, new Vector2((Game1.screenWidth / 2) - (cbw.X / 2), Game1.screenHeight - cbw.Y), Color.White);

            base.Draw();
        }
    }
}
